#include "tile.h"
#include "tilegroup.h"

char * Tile::DEFAULT_UNPLACED = "......";
char * Tile::DEFAULT_PLACEMENT = "######";

void Tile::draw(Graphics * g, char * text, int color)
{
	int x = position.x * DRAW_WIDTH, y = position.y * DRAW_HEIGHT;
	g->drawText(text, x, y, DRAW_WIDTH, DRAW_HEIGHT, true, color);
}

void Tile::draw(Graphics * g)
{
	if(company){
		draw(g, company->getName(), company->getColor());
	}else{
		draw(g, DEFAULT_UNPLACED, Graphics::DEFAULT);
	}
}
